<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>扩展运算实践1</title>
  <style>
    #myId {
      padding: 200px;
     
    }
    #myId span {
      /* 动画元素如果是行内元素，要改为行内块元素/块级元素 */
      display: inline-block;
      font-size: 24px;
      font-weight: bold;
      transition: transform .3s;
    }
    #myId span:hover{
      transform: scale(2) translateY(-10px) rotateZ(10deg);
    }
  </style>
</head>
<body>
  <div id="myId">i am chensai!</div>
  <script>
    const myIdEle = document.querySelector('#myId');
    // [...'cs'] ===> ['c', 's'];
    const childArr = [...myIdEle.textContent].map(ele => `<span>${ele}</span>`);
    myIdEle.innerHTML = childArr.join('');
  </script>
</body>
</html>